<template>
  <div id="app">
    <div class="main" v-if="isFrontendRoute">
      <router-view ></router-view>
      <el-backtop :visibility-height="500" :right="40" :bottom="200">
        <div class="backtop">
          <i class="el-icon-arrow-up"></i>
        </div>
      </el-backtop>
    </div>
    <router-view  v-else/>
  </div>
</template>

<script>
export default {
  name: 'App',
  computed: {
    isFrontendRoute() {
      return this.$route.name === 'home' || this.$route.matched.some(record => record.name === 'home');
    }
  },
}
</script>
<style>

.main {
  width: 100%;
  min-width: 1900px;
  height: 100%;
}
.main .main-container{
margin-left: 0 !important;
}
.main .hideSidebar .main-container{
margin-left: 0 !important;
}
.backtop {
  border-radius: 6px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.12);
  text-align: center;
  line-height: 40px;
  color: #fff;
}

</style>